package com.qf.kaohe.service.impl;

import com.qf.kaohe.mapper.TUserMapper;
import com.qf.kaohe.pojo.TUser;
import com.qf.kaohe.service.TUserService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class TUserServiceImpl implements TUserService {
    @Resource
    TUserMapper mapper;

    @Override
    public List<TUser> allTUserPage() {
        List<TUser> TUsers = mapper.allTUserPage();
        return TUsers;
    }

    @Override
    public List<TUser> selectByInput(String name, String type, Integer isDele) {
        List<TUser> TUsers = mapper.selectByInput(name,type,isDele);
        return TUsers;
    }

    @Override
    public Integer insert(String name, String type, String note) {
        Integer res = mapper.insertByData(name, type, note);
        return res;
    }

    @Override
    public TUser selectById(Integer id) {
        TUser tUser = mapper.selectById(id);
        return tUser;
    }

    @Override
    public Integer updateByData(Integer id, String name, String type, String note) {
        Integer res = mapper.updateByData(id,name,type,note);
        return res;
    }

    @Override
    public Integer deleteById(Integer id) {
        Integer res = mapper.deleteById(id);
        return res;
    }
}
